<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if,v-show,v-for</title>
    <script src="vue.js"></script>
</head>
<body>
<div id="root">
    <div v-show="show">hello vue</div>
    <button @click="handleClick">toggle</button>
    <ul>
        <!--<li v-for="item of list" :key="item">{{item}}</li>-->
        <li v-for="(item,index) of list" :key="index">{{item}}</li>
    </ul>
</div>
<script>
    new Vue({
        el:"#root",
        data:{
            show:true,
            list:[1,1,3]
        },
        methods:{
            handleClick:function () {
                this.show = !this.show;

            }
        }
    })
</script>
</body>
</html>